package org.example.admin.controller;

import org.example.admin.entity.Demo;
import org.example.admin.service.DemoService;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Inject;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.annotation.Param;

@Controller
public class DemoController {
    @Inject
    DemoService demoService;
    @Mapping("/hello")
    public String hello(@Param(defaultValue = "world") String name) {
        System.out.println("111111111111");
        Demo byId = demoService.findById(1L);
        System.out.println(byId);
        return String.format("Hello %s!", name);
    }
}